﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Objects.DataClasses;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace SchoolManagerMVC.Repository.EntityFramework
{
    [MetadataType(typeof (StudentMeta))]

    public partial class Student
    {
        public string FirstLast
        {
            get
            {
                return LastName + ", " + FirstName;
            }
        }
    }
        
    
    public class StudentMeta
    {
        [Required, Display(Name = "First Name"), StringLength(50)]        
        public string FirstName { get; set; }

        [Required, Display(Name = "Last Name"), StringLength(50)]
        public string LastName { get; set; }

        [Required]
        public int? Age { get; set; }

        

        [ScaffoldColumn(scaffold:false)]
        public Guid UniqueID { get; set; }

        [DisplayFormat(DataFormatString="{0:c}")]
        public decimal TuitionOwed { get; set; }
    }
}
